import { getDay, getMonth, getYear } from './date.js'

export default async (field , date) => {
    let data = null

    switch (field) {
        case 'day' : 
            data = await getDay(date)
        break;    
        case 'month' : 
            data = await getMonth(date)
        break;    
        case 'year' : 
            data = await getYear(date)
        break;    
        default :
        break; 
    }

    return data
}